/******************************************************************************
 * Product: Adempiere ERP & CRM Smart Business Solution                       *
 * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved.                *
 * This program is free software, you can redistribute it and/or modify it    *
 * under the terms version 2 of the GNU General Public License as published   *
 * by the Free Software Foundation. This program is distributed in the hope   *
 * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.           *
 * See the GNU General Public License for more details.                       *
 * You should have received a copy of the GNU General Public License along    *
 * with this program, if not, write to the Free Software Foundation, Inc.,    *
 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.                     *
 * For the text or an alternative of this public license, you may reach us    *
 * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA        *
 * or via info@compiere.org or http://www.compiere.org/license.html           *
 *****************************************************************************/
/** Generated Model - DO NOT CHANGE */
package org.compiere.model;

import java.sql.ResultSet;
import java.sql.Timestamp;
import java.util.Properties;
import org.compiere.util.KeyNamePair;

/** Generated Model for hrm_charge
 *  @author Adempiere (generated) 
 *  @version Release 3.7.0LTS - $Id$ */
public class X_hrm_charge extends PO implements I_hrm_charge, I_Persistent 
{

	/**
	 *
	 */
	private static final long serialVersionUID = 20130628L;

    /** the default Constructor */
    public X_hrm_charge(Properties ctx)
    { 
      super (ctx, null, null);
    } 

    /** Standard Constructor */
    public X_hrm_charge (Properties ctx, int hrm_charge_ID, String trxName)
    {
      super (ctx, hrm_charge_ID, trxName);
      /** if (hrm_charge_ID == 0)
        {
			sethrm_charge_ID (0);
			sethrm_chargetype (null);
// Payment
        } */
    }

    /** Load Constructor */
    public X_hrm_charge (Properties ctx, ResultSet rs, String trxName)
    {
      super (ctx, rs, trxName);
    }

    /** AccessLevel
      * @return 3 - Client - Org 
      */
    protected int get_AccessLevel()
    {
      return accessLevel.intValue();
    }

    /** Load Meta Data */
    protected POInfo initPO (Properties ctx)
    {
      POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
      return poi;
    }

    public String toString()
    {
      StringBuffer sb = new StringBuffer ("X_hrm_charge[")
        .append(get_ID()).append("]");
      return sb.toString();
    }

	public org.compiere.model.I_C_Charge getC_Charge() throws RuntimeException
    {
		return (org.compiere.model.I_C_Charge)MTable.get(getCtx(), org.compiere.model.I_C_Charge.Table_Name)
			.getPO(getC_Charge_ID(), get_TrxName());	}

	/** Set Charge.
		@param C_Charge_ID 
		Additional document charges
	  */
	public void setC_Charge_ID (int C_Charge_ID)
	{
		if (C_Charge_ID < 1) 
			set_Value (COLUMNNAME_C_Charge_ID, null);
		else 
			set_Value (COLUMNNAME_C_Charge_ID, Integer.valueOf(C_Charge_ID));
	}

	/** Get Charge.
		@return Additional document charges
	  */
	public int getC_Charge_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_C_Charge_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set End Date.
		@param EndDate 
		Last effective date (inclusive)
	  */
	public void setEndDate (Timestamp EndDate)
	{
		set_Value (COLUMNNAME_EndDate, EndDate);
	}

	/** Get End Date.
		@return Last effective date (inclusive)
	  */
	public Timestamp getEndDate () 
	{
		return (Timestamp)get_Value(COLUMNNAME_EndDate);
	}

	/** Set hrm_charge ID.
		@param hrm_charge_ID hrm_charge ID	  */
	public void sethrm_charge_ID (int hrm_charge_ID)
	{
		if (hrm_charge_ID < 1) 
			set_ValueNoCheck (COLUMNNAME_hrm_charge_ID, null);
		else 
			set_ValueNoCheck (COLUMNNAME_hrm_charge_ID, Integer.valueOf(hrm_charge_ID));
	}

	/** Get hrm_charge ID.
		@return hrm_charge ID	  */
	public int gethrm_charge_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_hrm_charge_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** hrm_chargetype AD_Reference_ID=1000152 */
	public static final int HRM_CHARGETYPE_AD_Reference_ID=1000152;
	/** Payment = Payment */
	public static final String HRM_CHARGETYPE_Payment = "Payment";
	/** Reserve = Reserve */
	public static final String HRM_CHARGETYPE_Reserve = "Reserve";
	/** Aid = Aid */
	public static final String HRM_CHARGETYPE_Aid = "Aid";
	/** OPV = OPV */
	public static final String HRM_CHARGETYPE_OPV = "OPV";
	/** IPN = IPN */
	public static final String HRM_CHARGETYPE_IPN = "IPN";
	/** CNalog = CNalog */
	public static final String HRM_CHARGETYPE_CNalog = "CNalog";
	/** COtche = COtche */
	public static final String HRM_CHARGETYPE_COtche = "COtche";
	/** Set hrm_chargetype.
		@param hrm_chargetype hrm_chargetype	  */
	public void sethrm_chargetype (String hrm_chargetype)
	{

		set_Value (COLUMNNAME_hrm_chargetype, hrm_chargetype);
	}

	/** Get hrm_chargetype.
		@return hrm_chargetype	  */
	public String gethrm_chargetype () 
	{
		return (String)get_Value(COLUMNNAME_hrm_chargetype);
	}

	/** Set Name.
		@param Name 
		Alphanumeric identifier of the entity
	  */
	public void setName (String Name)
	{
		set_Value (COLUMNNAME_Name, Name);
	}

	/** Get Name.
		@return Alphanumeric identifier of the entity
	  */
	public String getName () 
	{
		return (String)get_Value(COLUMNNAME_Name);
	}

    /** Get Record ID/ColumnName
        @return ID/ColumnName pair
      */
    public KeyNamePair getKeyNamePair() 
    {
        return new KeyNamePair(get_ID(), getName());
    }

	/** Set Start Date.
		@param StartDate 
		First effective day (inclusive)
	  */
	public void setStartDate (Timestamp StartDate)
	{
		set_Value (COLUMNNAME_StartDate, StartDate);
	}

	/** Get Start Date.
		@return First effective day (inclusive)
	  */
	public Timestamp getStartDate () 
	{
		return (Timestamp)get_Value(COLUMNNAME_StartDate);
	}
}